package com.ruoyi.business.controller;

import com.ruoyi.business.domain.CourseComment;
import com.ruoyi.business.domain.bo.CourseCommentBo;
import com.ruoyi.business.service.ICourseCommentService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 最爱喝兽奶
 * @create 2022/8/5
 **/
@RestController
@RequestMapping("/business/courseComment")
public class CourseCommentController extends BaseController {

    @Autowired
    private ICourseCommentService courseCommentService;

    @Log(title = "课程评论信息", businessType = BusinessType.INSERT)
    @PostMapping
    @ApiOperation("插入课程评论信息")
    public AjaxResult insertCourseComment(@RequestBody CourseCommentBo bo) {
        courseCommentService.insertCourseComment(bo);
        return AjaxResult.success();
    }

}
